package com.ruoyi.yyq.api.factory;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.yyq.api.RemoteCarRescueTaskService;
import com.ruoyi.yyq.api.domain.CarRescueTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteCarRescueTaskFallbackFactory implements FallbackFactory<RemoteCarRescueTaskService> {
	private static final Logger log = LoggerFactory.getLogger(RemoteCarRescueTaskFallbackFactory.class);
	@Override
	public RemoteCarRescueTaskService create(Throwable cause) {
		log.error("救援服务调用失败:{}", cause.getMessage());
		return new RemoteCarRescueTaskService(){


			@Override
			public TableDataInfo getlist(String source, CarRescueTask carRescueTask) {
				return null;
			}

			@Override
			public AjaxResult getAdd(String source, CarRescueTask carRescueTask) {
				return null;
			}

		};
	}
}
